package com.xiaoxu.intranetweb.mybatisplusSzappdb.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.bo.PlanDetailBo;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.bo.StatisticPlanBo;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.entity.CPdtPlanEx;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.vo.GetAllPdtPlanVo;
import com.xiaoxu.intranetweb.mybatisplusSzappdb.vo.GetPdtPlanDetailVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 产品计划审批表 Mapper 接口
 * </p>
 *
 * @author xiaoxu
 * @since 2022-12-27
 */
@Component
@DS("szappdb")
public interface CPdtPlanExMapper extends BaseMapper<CPdtPlanEx> {

    List<GetAllPdtPlanVo> statisticPlan(@Param("s") StatisticPlanBo params);
//    查询PdtPlanexId最大的值
    @Select("select max(PDT_PLANEX_ID) from C_PDT_PLAN_EX")
    BigDecimal getMaxPdtPlanexId();

    List<GetPdtPlanDetailVo> pdtPlanDetail(@Param("s") PlanDetailBo params);
}
